package com.king.framework.base.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.IService;
import com.king.framework.base.domain.vo.PageResult;

//@NoRepositoryBean
public interface YyBaseService<T, ID extends Serializable> extends IService<T>{

    T findByPK(ID id) throws Exception;

    Iterable<T> findByPKS(Collection<ID> idList) throws Exception;

    Iterable<T> findAll() throws Exception;

    void doDelete(T entity) throws Exception;

    void doDelete(Iterable<T> list) throws Exception;

    void doDelete(ID id) throws Exception;

    void doDelete(ID[] ids) throws Exception;
    
    void doDeleteAll() throws Exception;

    T doAdd(T entity) throws Exception;

    Iterable<T> doAdd(Iterable<T> entities) throws Exception;

    T doUpdate(T entity) throws Exception;

    Iterable<T> doUpdate(Iterable<T> entities) throws Exception;

    PageResult<T> doQuery(Map<String, Object> searchMap) throws Exception;
}